﻿@model projectManagementWeb.Models.ProjectLeader.createModuleModel

@{
    HtmlHelper.ClientValidationEnabled = true;
    HtmlHelper.UnobtrusiveJavaScriptEnabled = true;
    ViewBag.Title = "createModule";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div align="right">
    @Html.ActionLink("<< Regresar", "ModuleIndex")
</div>


<style type="text/css">
.ui-datepicker { width: 17em; padding: .2em .2em 0; background: #66FF99;}
</style>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".date").datepicker
            ({
                dateFormat: 'mm/dd/yy',
                showStatus: true,
                showWeeks: true,
                highlightWeek: true,
                numberOfMonths: 1,
                showAnim: "scale",
                showOptions: {
                    origin: ["top", "left"]
                }
            });
    });
</script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
    @Html.HiddenFor(model => model.userID)
        <legend>Crear Módulo</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.startDate)
        </div>
        <div class="editor-field">

                @Html.TextBox("startDate", Model.startDate.ToString(), new { @class = "date" })
            @Html.ValidationMessageFor(model => model.startDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.endDate)
        </div>
        <div class="editor-field">
                    @Html.TextBox("endDate", Model.endDate.ToString(), new { @class = "date" })
            @Html.ValidationMessageFor(model => model.endDate)
        </div>
        

        <div class="editor-label">
            @Html.LabelFor(model => model.projectID)
        </div>
        <div class="editor-field">
        
            @Html.DropDownListFor(model => model.projectID, new SelectList(Model.ProjectIDList, "Value", "Text", Model.projectID))
            
            @Html.ValidationMessageFor(model => model.projectID)
        </div>

        <p>
            <input type="submit" value="Crear" />
        </p>
    </fieldset>
}


